﻿using System;
using System.Data;
using System.Data.SqlClient;
using System.Security.Cryptography;
using System.Collections;
using System.Text;
using System.Configuration;
using System.Text.RegularExpressions;
using TheCollectiveNetwork.Classes.GlobalFunctions;
using TheCollectiveNetwork.Classes.Globals;

namespace TheCollectiveNetwork.Classes.Debugging
{

   
        public class Debug
        {
              
                    
            public static void WriteMessage(string p_message)
            {
                string rsql;
                SqlCommand sqlcmd; 
                SqlConnection dbconn;

                dbconn = new SqlConnection(ConfigurationManager.ConnectionStrings[constring.write_str].ConnectionString);
                rsql = "Insert into Debug_Messages (Message) values (@message);";
                sqlcmd = new SqlCommand(rsql, dbconn);
                sqlcmd.Parameters.AddWithValue("@message", p_message);

                dbconn.Open();
                sqlcmd.ExecuteNonQuery();
                dbconn.Close();
            }
            

        }

           

}
